package team.pwy.service;

import co.elastic.clients.elasticsearch.core.search.Hit;
import org.springframework.data.elasticsearch.annotations.Highlight;
import org.springframework.data.elasticsearch.annotations.HighlightField;
import org.springframework.data.elasticsearch.annotations.HighlightParameters;
import team.pwy.pojo.entity.MovieIndex;
import team.pwy.pojo.entity.TypeIndex;

import java.io.IOException;
import java.util.List;

public interface TypeIndexService {

    public void initIndex ();

    @Highlight(
            //字段
            fields = {@HighlightField(name = "status")},


            parameters = @HighlightParameters(preTags = {"<span style='color:red'>"}, postTags = {"</span>"}, numberOfFragments = 0)
    )
    List<Integer> findByType(String type) throws IOException;

}
